<template>
  <el-radio-group ref="compRef" v-model="value" v-bind="{ ...$props }">
    <template v-for="(_slot, slotName) in $slots" #[slotName]="slotProps">
      <slot :name="slotName" v-bind="slotProps" :key="slotName"></slot>
    </template>
  </el-radio-group>
</template>
<script setup lang="ts">
import { ref } from "vue";
type Props = {
  modelValue?: string | number | boolean;
  size?: "" | "default" | "small" | "large";
  disabled?: boolean;
  validateEvent?: boolean;
  textColor?: string;
  fill?: string;
  name?: string;
  id?: string;
};

/** 需要按照官网文档设置默认值，否则表现效果和官网文档的不一致 */
withDefaults(defineProps<Props>(), {
  size: "default",
  validateEvent: true,
  textColor: "#ffffff",
  fill: "#409eff",
});

const value = defineModel();
const compRef = ref();
</script>
<style lang="scss"></style>
